#include"stdio.h"
#include"stdlib.h"
typedef  struct link{
	int data;
	struct	link* next;
};
void main(){
	link *l=(link*)malloc(sizeof(link));	
	link *l1=(link*)malloc(sizeof(link));
	link *l2=(link*)malloc(sizeof(link));
	link *l3=(link*)malloc(sizeof(link));

	l->next=l1;
	l1->next=l2;
	l2->next=l3;
	l3->next=NULL;
	l1->data=1;
	l2->data=2;
	l3->data=3;
	link *p=l->next;
	/*while(p!=NULL){
		printf("%d",p->data);
		p=p->next;
	}*/
	l3=NULL;
	p=l->next;
	
	while(p!=NULL){
		printf("%d",p->data);
		p=p->next;
	}
}